﻿using System;
using System.Linq.Expressions;
using System.Web.Mvc;
using DevExpress.Web.Mvc;

namespace Bonesystem.Extensions
{
    public static class LargeDataExtensions
    {
        public static void LargeDataDefaultSettings<T, TProperty>(this HtmlHelper<T> htmlHelper,
             Expression<Func<T, TProperty>> expression, ComboBoxExtension comboBox, 
            ItemsRequestedByFilterConditionMethod getRange, ItemRequestedByValueMethod getById)
        {
            comboBox.BindList(getRange, getById);
        }
        
        public static void ProdutoLargeDataSettings<T, TProperty>(this HtmlHelper<T> htmlHelper,
             Expression<Func<T, TProperty>> expression, ComboBoxExtension comboBox, 
            ItemsRequestedByFilterConditionMethod getRange, ItemRequestedByValueMethod getById)
        {
            LargeDataDefaultSettings(htmlHelper,expression,comboBox,getRange,getById);
        }

    }
}